package com.huawei.gamebox.service.welfare.common.card;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.welfare.gift.bean.GiftCardListBean;
import o.cgz;
import o.chy;
import o.dof;
import o.exp.d;

public class SearchGiftTitleCard extends GsTitleCard {
    private LinearLayout ˊ;

    public SearchGiftTitleCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        ॱ((TextView) view.findViewById(d.ꜞ));
        this.ˊ = (LinearLayout) view.findViewById(d.ꜟ);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        if (cardBean instanceof GiftCardListBean) {
            GiftCardListBean giftCardListBean = (GiftCardListBean) cardBean;
            this.ˊᐝ = giftCardListBean;
            ˊˋ().setText(giftCardListBean.v_());
            if (dof.ॱ(giftCardListBean.ॱॱ()) || giftCardListBean.ˊ().size() < 3) {
                this.ˊ.setVisibility(4);
            } else {
                this.ˊ.setVisibility(0);
            }
        }
    }

    public void ॱ(final chy o_chy) {
        this.ˊ.setOnClickListener(new OnClickListener(this) {
            final /* synthetic */ SearchGiftTitleCard ॱ;

            public void onClick(View view) {
                if (o_chy != null) {
                    o_chy.ˏ(9, this.ॱ);
                }
            }
        });
    }
}
